const http = require("http")
const https = require("https")
const http2 = require("http2")


// console.log(http)
// console.log(https)
// console.log(http2)

let server = http.createServer()

// 监听对当前服务器对象的请求
server.on('request', function(req, res){
    res.end("hello world")
})

server.listen(3000, ()=>{
    // 启动监听端口号成功时触发
    console.log("服务器启动成功")
})
